﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MainPanel : BasePanel
{
    private void Awake()
    {
        transform.Find("OpenFirstPanelBtn").GetComponent<Button>().onClick.AddListener(OnOpenFirstPanelClick);
        transform.Find("OpenSecondPanelBtn").GetComponent<Button>().onClick.AddListener(OnOpenSecondPanelBtnClick);
        transform.Find("OpenThirdPanelBtn").GetComponent<Button>().onClick.AddListener(OnOpenThirdPanelBtnClick);
    }

    public override void OnEnter()
    {
        base.OnEnter();

    }
    public override void OnPause()
    {
        base.OnPause();
    }
    public override void OnResume()
    {
        base.OnResume();
    }
    public override void OnExit()
    {
        base.OnExit();
    }

    private void OnOpenFirstPanelClick()
    {
        UIManager.Instance.PushPanel(UIPanelType.First);
    }
    private void OnOpenSecondPanelBtnClick()
    {
        UIManager.Instance.PushPanel(UIPanelType.Second);
    }
    private void OnOpenThirdPanelBtnClick()
    {
        UIManager.Instance.PushPanel(UIPanelType.Third);
    }
}
